package com.cskaoyan.model.vo.goods;

import lombok.Data;

import java.util.List;

/**
 * @program: project-market
 * @description: vo商品模块查询所有商品
 * @author: Jesson Guo
 * @create: 2021-11-29 22:20
 **/

@Data
public class GoodsBaseData {
    Integer page;
    Integer limit;
    Integer total;
    Integer pages;
    List list;

    //全参构造
    public GoodsBaseData(Integer page, Integer limit, Integer total, List list) {
        this.page = page;
        this.limit = limit;
        this.total = total;

        this.list = list;
        if (total%limit!=0) {
            this.pages = total / limit+1;
        }else {
            this.pages = total / limit;
        }
    }
}